package org.kzwl.service.web;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.kzwl.comm.pojo.ResponseData;
import org.kzwl.comm.pojo.bo.AdminQueryNewsBO;
import org.kzwl.comm.pojo.bo.NewsBO;
import org.kzwl.comm.pojo.bo.news.NewsBasicBO;
import org.kzwl.comm.pojo.bo.news.QueryDetailsBO;
import org.kzwl.comm.pojo.dto.news.NewsDTO;
import org.kzwl.entity.web.News;

import java.util.List;

public interface NewsService  extends IService<News> {

    ResponseData<Void> saveOne(NewsBO newsBO);

    ResponseData<IPage<News>> adminQuery(AdminQueryNewsBO newsBO);

    /**
     * 根据ID查询详情
     * @param Id
     * @return
     */
    ResponseData<News> queryOne(Long Id);

    ResponseData<Void> updateOne(NewsBO newsBO);

    ResponseData<Void> deleteId(Long Id);

    //app接口 -- 首页新闻查询
    List<NewsDTO> indexQuery(NewsBasicBO newsBO);

    //app接口 -- 新闻查询
    IPage<NewsDTO> queryBasic(NewsBasicBO newsBO);

    //app接口 -- 查询详细
    NewsDTO queryDetails(QueryDetailsBO newsBO);

    //app查询最新资讯
    List<NewsDTO> queryNews(NewsBasicBO newsBO);
}
